<%@ taglib prefix="jstl" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
    Document   : index
    Created on : Jun 1, 2016, 2:06:23 PM
    Author     : niugao
--%>
<%@page contentType="text/html" pageEncoding="UTF-8" %>
<%@ include file="common.jsp" %>
<html>
<  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
    <title>员工信息修改</title>
    <link rel="stylesheet" type="text/css" href="/css/main.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <script src="/js/jquery-1.12.4.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="/js/bootstrap.min.js"></script>
    <style>
        .container input {
            width: 100%;
        }

        .container div {
            margin: 5px 0px;
        }
    </style>

    <script>
        $(document).ready(function(){
            $("#back").click(function(){
                window.history.back(-1);
            });
        });
    </script>
</head>
<body>
<jsp:include page="componse/top_bar.jsp" flush="true"/>

<nav class="navbar navbar-default" role="navigation">
    <div class="navbar-header">
        <a class="navbar-brand" href="/main">返回</a>
    </div>
    <div>
        <ul class="nav navbar-nav">

            <li><a href="/Saccount/student_man">员工管理</a></li>
            <li class="active"><a>修改员工</a></li>
        </ul>
    </div>
</nav>

<div style="text-align: center;">
    <div class="container" style="width: 400px;margin: 10px auto;text-align: left; ">
        <form method="POST" action="/Saccount/modifystu">
            <div class="row">
                <div class="col-md-12">
                    姓名： <input type="text" name="name" value="${student.name} " />
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    密码： <input type="text" name="password" value="${student.password} " />
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    电话： <input type="text" name="phone" value="${student.phone} " />
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    邮箱： <input type="text" name="email" value="${student.email} " />
                </div>
            </div>
            <div class="row">
                <div class="col-md-3" style="text-align: right">
                    <%--性别： <input type="text" name="sex"/>--%>
                    男
                </div>
                <div class="col-md-3" style="text-align: left">
                    <input type="radio" name="sex" value="feman"  checked/>
                </div>
                <div class="col-md-3" style="text-align: right">
                    女
                </div>
                <div class="col-md-3" style="text-align: left">
                    <input type="radio" name="sex" value="man">
                </div>
            </div>

            <div class="row">
                <div class="col-md-12" >
                    <%--班级： <input type="text" name="class_id"/>--%>
                    部门：
                    <select name="class_name" style="width: 250px">
                        <jstl:forEach items="${classArray}" var="cls">
                            <option value=${cls.id}>${cls.name}(${cls.level})</option>
                        </jstl:forEach>
                    </select>

                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    地址： <input type="text" name="address" value="${student.address}" />
                </div>
            </div>

            <div class="row" style="border-top:solid 1px;">
                <div class="col-sm-12">
                    <input type="submit" name="role" value="确定"/>
                </div>
            </div>
        </form>
        <div class="col-sm-12">
            <input type="submit" id="back" name="role" value="返回"/>
        </div>

    </div>
    <div class="row" style="color: red">
        ${errMsg}
    </div>
</div>
</body>
</html>
